Merging from Dpt's fork