Made type checking return kinda principal type for the bindig construct; defined constructor functions for the unit type; refactored code