Code refactoring
Added docblocks