First attempt at a working parser