Added tests for rules, added new rules, fixed code formatting, added license