Add keyword searches given by Petr and refactor keyword library(part1)