Refactored a bunch of the old code and added some new functions.
Preparing to implement movement for each piece.

Signed-off-by: MasterPpv <pritenvora@gmail.com>