fixed bugs for config file and snippet file; fixed failing specs; small code improvements