More comments, refactoring and added copyright intuit