Added json lib, improved keyword detection