refactor js, add Wiggle object