Added changes from Elektrolurch to enable exact positioning.

Also implemented a basic parse function to update the state.