reorganize all code

added CodePanel, ControlPanel, and OutputPanel. transferred relevant
code from MainFrame to each of the panels