Replace String.substring calls with String.slice calls for a tiny performance boost.