Consolidated some repeated logic and continued documenting classes.