#396 Fixed tests
#396 Fixed importing dependencies
#396 Moved entities to namespace
#396 Fixed creating a new connection