Minor code clean up, remove insertAfter and insertBefore as they are not used.