Added debug and release options and run flag.