Added new functionality and an updated interface to core.js, updated tests and sandbox