Merged from Trevors Branch