Misc refactoring from testing with live renderer