Adding REST functionality.