Ernies cleanup 12 12

Fix #272 #274 #277