Fixing formatting and adding full castling support