Rewritten dissertation.