Minor improvements, added layer to paint conversion