more config.h from cmake; fixed cmake compilation; cleaned up scripts