Simplify apihandler