Reorganize, use autoload functions.