moved inner classes into constructor
updated README