Clean up redundant code blocks