The answers posted here have not been fully checked for correctness. Please contact me if you find any errors and I'll fix them as quickly as possible.