Get display refresh loop working