Merged various changes from master.