Put insert mode handlers in their own module

Signed-off-by: Casey Dahlin <casey.dahlin@gmail.com>