fixed camera capture, cleaned up some stuff