Refactor and finish