cleanup code blocks