herp
first big refactor complete