added tests and bug fixes for server creation for deployment