Initial parsing functionality and some tests