first unit tests
reorganize brain.js exports