Various improvements, including use of autoload instead of require.