Adapting to new phpRest
clean up
first version: headers start working
rewrite template with local constants

Fix daily headers