autoloading + general fixes