code cleaning and color coding test errors