added sample images, error checking on JSON.parse, fixed attribute editing