Mid inst refactoring
Redoing inst