Move api to own file and use slightly lighter-weight object-literal syntax