MongoDB integration, cleanapp.py, misc updates