warnings removed
Code refactoring