1) added support of bear repository; 2) many improvements