Restructured processing pacakge and global refactoring, also new generator class.