Rules and output now working, in middle of confirming everything before refactor