Re-organize variable definitions