Code review, clean-up and source formatting

Signed-off-by: geoffreymcgill <geoff@ext.net>