Fixed bug that would prevent optional route variables from working with URLGenerator, updated tests