Mihass' stuff readded after previous merge problem