Some Refactoring done