Move parsing into a separate package