Feature/layout

Reorganise the code layout into logical modules, and include marionette as the RPC module.