added demo and clock changes from 4.1 branch