Few code refactoring done