Started creating a general file loader.

This will probably need to be split into multiple files