Refactor to parse function in separate file
Initial commit