Improved Code Structure