Improved Rest-handling