some refactoring and condensing
some refactoring and condensing

hms-dbmi/4DN_matrix-viewer,hms-dbmi/higlass,hms-dbmi/higlass,hms-dbmi/4DN_matrix-viewer,hms-dbmi/higlass,hms-dbmi/4DN_matrix-viewer,hms-dbmi/higlass