Lots of tidying up

Improved PSR0 compliance.
Removed uneccesary interfaces.
Lots of tidying up