Making optional elements marked as such and adding wait for AJAX node selection