Refactor and document methods