config and adapter for karma unit test framework
fix bug
fix bugs for mega bot