Fixed errors, added visualization