Abstraction of camera code

It could be better. Help.