Minor fixes and features for API