Some fixes and changes to the public interface