Code cleanup
Split tree and flow view off into own controls