Makes some changes for type-safety