Upgrade SDK from GA1 to GA2 and commit plugin code

Please review the changes made between my fork and  the original repo.