added rewriting for slightly nicer urls