Add docblock to the top file start to refactor
More Refactoring
Added doc blocks to functions