Added TODO [ci skip]
Removed unused code
Reordered code + added test. No functional change intended
Synced from master
Synced from master