Further code cleaning