Final refactor and commets