Added docs and cleaned up MIS code