Some minor cleanups and commenting