Re-organize main