tiny changes
split up main module into state, render, update, and event_handler