added ApplicationParams factory and make 141 restart policy check for restarts in a time window instead of a absolute number of restarts