Changed calling interface and other improvements