Logic Cleanup