Further code cleanup