Moved mode-switching logic from designer.js into modes.js
Merge pull request #613 from flukeout/modes

Moved mode-switching logic from designer.js into modes.js