Refactored attributes and added docblocks.