Refactor autoload paths, add tests