split up state and render into separate modules
isolate input and update into separate modules