Merge changes from the phobos branch