refactor of autoloader and removal of console from it