Adds parse function
Partially refactors parseMessage
Refactors parseMessage further
Completes parseMessage refactor