Fix tests and fucntion declaration.