Added endpoint tests
More logical import order
More complete tests for connection