Completed all rules, reasonable performance

TODO: Handle namespaces
TODO: Resolve remaining issues from project 1 on grading sheet