refactoring & cleaning, but camera not works yet as expected