Initial naive implementation of addBefore and addAfter
Added intermediary handlers to maintain ordering of handlers added
Added minor comments