Corrected the code to change the name of the class generated in order to suit to new needs. Also did some cleaning up´.