Added docblocks and finished functions.