adding tests for Sandbox.
refactoring Sandbox.