Completed functions for castling and started on pawn promotion