Added Graph API call functionality and some bugfixes