pep 8'd
added contructor tests. Fixed bug in allocation of type-ids