Adding API functions and updating docs