Added correct update logic.
Removed unnecessary parsing function.