Code Cleanup

Code formatting with defaults of CodeMaid
XML comments
Parameter null checks