Add some type signatures and documentation in elab