Did a little bit of cleanup on load code