Isha refactoring

Works good enough for now