Extracted statusButton into a function.  Some small tidy-ups (whitespace, semicolons, etc.)