Initial checkin, extracted from Rapture I/O