Some bugs were fixed, test file was added, refactoring