Refactored Test JS a bit and added initial spec definitions