Deselect objects before saving

So that you don't get weird selection things when you save the profile
picture. Also added some preliminary code to tile the images, but that
still needs a lot of work & testing