begin merciless refactor