Redone, re-orged, simplified.

Thanks samstoller