Move js out, bound whitespace
Detect rivers and do a really simple fix