Squashed commit of all changes introduced by @mkaluza from TC kernel