First pass of cleanup for #180