Massive changes to allow use with composer.

-- Note that tests have been removed as they also need updating.
Bugfixes
Update README.md