Refactoring + Comments

> Added more test cases to integration testing.