Some refactoring done

done