Added ConnectionInterface interface, moved repositories to their own namespaces and updated code according to these changes.