Re-org code