Add camera plugin and some refactoring.