js cleanup part 1