Implemented the new .slice() method (bug #1517).