REST code and header fixes