Added Main environment class and main function

Please avoid using import * when you can explicitly state what exactly you want to import. http://stackoverflow.com/questions/2386714/why-is-import-bad