Refactored & fixed health check code

Another refactoring and regression-fix of the health check code

Fix: negation operator was bind to string instead of indexOf result - Therefore health check result was always displayed as "failed"
Improvement: Introduced functions, named the color codes.