Require coveralls only in travis env
Use double instead of stub to avoid deprecation warnings
Isolate middleware code
Complete routing refactor
Reorganized code