Renamed set_state, added conversion methods