adding dict style of data return, refactoring for inheritance, some caching implemented