Rewritten from scratch; remove credits