Moved the Loader class into seperate file.