Moved the gotobed routine over to action.js - where it logically belongs.