Timer lock function now working. Some minor polish remains