Moonrise added and continued refactoring