Fix restful interface handling; links generation
Merge style into query page