A few fixes an upgraded functionality