Add route options and some performance improvements