Code refactored to use php 5.3 namespaces and support PSR-4 namespaces