Re-shaping python and javascript modes