Js sweep

Work in progress.