Refactor slide-add validation code; Clean up some logic