lib/parser: Cleanup and removal of unused method