Fixed autoloading issues and refactored directory structure