Adds a very simple type inference