Added primitive.c (unfinished), fixed a couple mistakes in primitive.h