code cleanups, added final on variables ++