Added camera functionality and main loop