Added support for round line caps
small code cleanup