Script editor functionality and fixes

Toolbar buttons now toggle properly based on editor status.
Added print and print preview.
Removed useless crap.