Fixed the shutdown error

Moved the shutdown code to the mode maintenance so that shutdown will
happen after the flashes finish. Needed to add a shutdown delay upon
startup to keep the unit from shutting down right after waking up.
Documentation

Simple documentation update.
Merge pull request #55 from mcsarge/master

Fixed problem on locking mode so that the unit will shutdown properly.