Fix Path bounding box, improve rendering logic

Fix for path bounding box and some changes in path rendering.