chore(cleanup): Refactored code with docblocks