Summary: Moved some of the loader stuff into functions.
Testing: None
Reviewers: None