Actual thesis with minor corrections.