Added basic framework

added the basic framework and editing the deprecated pieces of code.
also added the permissions to the manifest.