Revert "almost finish r.js impl"

This reverts commit 7bd8ff0eaa3f6c14d707f2dfbef3877b75f5e868.