changed require config and fixed minor bugs