Split package into server and common modules and bit added more testing.