Extended loader.
Cleaned up startup sequence. Added better exception cases. Cleaned up whitespace.