Separated routes
Removed dead code
Better query
Merge remote-tracking branch 'upstream/master'