Simplify some type checking, remove comments.