Refactor repo elk stack