Finished all the rules. Still need to implement recovery.