Work in progress: implementing protocol parser