Removed t method and replaced with type()
Fixed bugs from type() change
Fixed pre- and post-build commands