Mergebranch

work out the conflicts between master and refactor so we can merge.