just refactored parseKeywords,
made it much DRYer