Made some simplyfications