Basic Client Refactor

- Added some simple specs
- Moved code around to make it neater