General cleanup and commenting