Significant refactor to enable psr-0 autoloader support.