Door generation, quite involved... TODO Maybe simplify.