Added gap detector; camera control is now written in C#; code cleanup.