Updated tests and code so that server tests now pass