Added "concaveannular" endcaps mode and some other minor fixes

This includes fixes from tangui.