Bunch of fixes

I replaced the fancy `#if (js || as ...)` with a normal `Available on js, as` because it looks quite misplaced to me up there.

The other changes are mostly sorting and obvious bug fixes.