sliding tile js refactor WIP