Update loader.py with documentation

Format loader.py, and add documentation type specification.