First patchset:

Refactored methods and decreased complexity, number of paths, and number of lines, in genLegalDest() in Piece.java.
Patchset no.2:

- Removed duplicate code