Made zoom work, with some minor changes