Datatype implementation finished. Needs testing though.