Refactor/Tidy snippet selector layout functionality.