Added autoloader and made minor updates