Refactoring
Some minor modifications