Forked and custom merge of various changes.