Added -y flag for assume yes and fixed some bugs