merged the loaders into a generic loader and various other little cleanups and stuff