gitignore updated
Added comprehensive comments
refactoring