Enhance code structure