Clean up main logic file