Add missing unit and functional tests
Add unit tests for the server and scalars module Remove unused code