Improve output score + code cleaning