(And of course, Witek, if there are any suggestions on making this nicer/easier/safer, feel free to point them out...)