refactor code to conform to two space convention
update token_generator class, test fails