Fixed some bugs and added to the generator command