Modified RestAPI.register to handle one view at a time
Added example.
Not suposed to happen