move tile set tracking into functions
layer visibility can be turned off in the stylesheet
move tile DOM updates to own function