Merged latest stuff into patched version.