Refactor execin

ping @vishh