Mostly formatting changes, some added error handling.
Hotfix for error. Also, v1.5.1