add nii support and reorganize code
fixing index.html and adding local xio