Moved tests to individual js file.