Fix/495 refactoring code resolves #495

Can you specify a default value for sandbox? 'sandbox=False' would work.