Alt generator: increase reliability, improve tests, update docs