massive js improvements