Clean up code and insert additional methods

setSleeping(boolean flag);
isSleeping();