Small changes, mainly for API