Refactoring 
Added Javadoc comments