Refactor

ongoing pr....