Add addAt to functions

Also, renamed insertAt to setAt, and refactored setAt/removeAt/addAt to
use traverse