chore(cleanup): Refactor and document + cleanup