Fixes show/hide on tile editor

Also moved some code, and made small modifications, proper indenting...
Removes commented code
Short amount of code-cleanup