Added debug build option for default
Small amendments to reduce gcc warnings