Format loader.py, and add type specifications to docs
Merge pull request #236 from daboross/patch-loader-documentation

Update loader.py with documentation