removes some unused code, experimenting with allowing images