added tileset size independent functionality and mouse dragging tile placement