Moved the terrain generator to it's own class, further cleanup in main.