Move parse function in to its own file