Merge from branch mega to master, port is complete.