Some small changes. Tests need to be fixed.