added class finalScore for Result page
code optimized and modularized