Refactor to match soap

this wil supercede #2 & #3