blocks code cleanup