Added parse method.
Changed struct to reflect better coding style.