Make camera API more abstract, prepare for packaging