More rewriting in progress..