Interlal improvements, new API