Move code into lib directory
Implement a working parser