Some fuctions were not explicitly returning

values all the time.  Fixed that, also fixed up some formatting issues.
Fix up some missing {} 's in if statements.
More fixes to functions that might not return a value

and more code clarity fixes.