raw refactoring

need to separate from lots of class-level variables (e.g. _html)