Commit #13: Made some refactoring