Cleaned up the rules