modified common.h lightly, added types and linked list implementation