Just need to add the rules

Most of this is all good and cleaned up now. Still needs documentation
though.