Small fixes and interface improvements