Refactored converting objects to strings and parsing them back.

We need to add exception when format is wrong. I have allready had problem with it....Can you do that?