Remove ImageLayers, fix warnings, and add a flag to flip layers

r? @metajack