made splitter dialog and moved js to new file