Rewrote CSW setup (draft)