Added locking and initial camera init