Code fixes and formatting changes, as well as, added comments and data types.