Fixing memory leak
Some approximations to speed up calculation
Day/Night cycle implemented
Clean up code, clean up comments, fix warnings