* cleans code * reworks many code fragments into smaller methods and split into super class
* adds API support for fetching EMA