Clean up some duplication, improve some names