Adding documentation and function type specs.