Added skeleton architecture for state, manager and main loop.