Removed dependency on plone.api and fixed getting workflow state