Major ClientBase refactoring

* Split one massive file into multiple modules