Added assertions for input parameters. Reindent code based on outer closure. Stricter following of Core code formatting.
Added assertions for input parameters. Reindent code based on outer closure. Stricter following of Core code formatting.

sebastian-software/core,sebastian-software/core,sebastian-software/core