added extended search functionality. fixed bugs. optimized some code. still missing quality logging