cleaned up structure, larger [code] blocks