monotone code cleanup