Add doc logic and basic docs