Made grace time and sleep time configurable.