Application framework for moai