Improved save function

The save function takes care of the en passant state now