Added new problems.
Added more features.
Fixed bug.
Fixed bug on diagnal filps.
Refactored to remove duplication.
Refactring finished.