Some js & core improvements