cleanup, hardware bounce fix

Cleanup of code and comments.
Hardware bounce was an issue, fixed.