Added some base functions for checking if the move is valid
Moved some stuff