Bugs fixed after refactoring and added unqiidfile to gitignore