Cleaned up main js: removed and fixed streams