Major refactoring to get project to work with composer.
Added dependencies and separate unit tests