Merge fork into master

Attempting to recombine the fork and forked versions.