Feature/settable timeout

This adds a way to set a timeout for the menu, plus some code style fixes.