Got castling working