Major refactoring, moving logic from app.js to different modules in Traffic.js which contains testable peaces of code.