fixed id bug and added tests for server
added availability zone and security groups
all tests pass
refactoring preconditions routine