first reshuffling to try to get ScalaJS working