Massive refactoring to use Mocha more correctly for describe and it, and better reuse and readbility for tests
Fixed test for server test