Implemented device timeout after 5 minutes of inactivity (configurable).
Cleared out some outdated TODO comments.