Add the magic type_n:)

as well as some minor improvement