Rearrange IO Section

Move IO to top of program