Finish cleanup of JS structure.