optimization and refactoring
sinon added to fake server