some cleanup and some new features for data manipulation, video output is now working