lots of cleanup, moved header to a partial