a little cleanup and formatting

add some comments and whitespace. reduce some unnecessary levels of indentation
and add a couple writeConfig instances after modifying config variables where
they were missing.
stay indefinitely when timeout < 0

fixes issue #29 by avoiding setting a timeout when the provided timeout value
is less than 0. ident sets its own timeout value already so no need to modify anything else.
Merge pull request #30 from lonnen/frontend

change toast default to indefinite