Add docs and type specs