Added mials and bunch of fixes