Minor cleanup of code