Javascript reorganization.