initial restructuring

Initial restructuring of the client. This is **_not_** merge ready. This is only for review and for getting more ideas.