Got first version of type checkign working.