Merged parsing code with Reggie's, the parse function is broken for now