Swithed interface to block based api
Small refactor to api commands