Just writing and testing
Refact stub server for tests