Some rearranging and improvements.