Updated main app for CB 4.0 and script