Refactor to get rid of class structure ++

Misc minor improvements as well.