fixed bug with translayer
added method translayer.hide()
some logic moved from toolbox to main