Fix and completely implement capturing images