camera functionality restored

code has also been cleaned up