Added string length restrictions to entity fields. Some cleanup of TODO tags. Some documentation.