Add more flexibility sugar.js calls

Add some optional parameters ad return types.