WIP - converting parsing to use generics