Refactor of backend code, lets see unit tests.