formatting changes, cleaning up types (unsigned/signed)