#1870 and #1862 refactoring | Kavitha