Part of JS restructuring