Rest

Add to master the rest functionality