Updated camera function. Camera branch