clean up the loading code
Merge pull request #13 from lookfirst/master

clean up the loading code