Implemented more priority rules.