Reorganize into three main pieces