Basic layout

Added main bits of code and handlers.