Fix rotate to use only positive indexes
Remove warnings from C compilation
Fix samples/tests with nested formal arguments
Uncomment new functions