fix new preferences code
check for door open long-time
tidy up