merged core/moon.rb and core/state.rb; rearranged and padded src/