Major refactor for clarity and testability of existing controllers. Added unit tests for ItemsController and initial tests for ConnectionsController