Added more requirements, added a state to the API and moved invocation