Day night cycle and doxygen documentation and bug fixes