removed redundant function polyline and renamed path to shape(), which can now draw a polyline by supplying extra parameters, added many comments and generated docs