changed object structure to more lighter form. Fixed some generator bugs.