diff --git a/mobileplugin.info b/mobileplugin.info
index 15f43b7..35b536f 100644
--- a/mobileplugin.info
+++ b/mobileplugin.info
@@ -2,11 +2,13 @@
 name = Mobile Plugin
 description = Drupal mobile optimization package
 package = Mobile
-core = 6.x
+core = 7.x
 
-; Information added by drupal.org packaging script on 2010-01-26
-version = "6.x-2.0"
-core = "6.x"
-project = "mobileplugin"
-datestamp = "1264526408"
+files[] = mobileplugin.install
+files[] = mobileplugin.module
+files[] = mobileplugin.admin.inc
+files[] = mobileplugin-detect.inc
+files[] = mobileplugin_youtube.info
+files[] = mobileplugin_youtube.module
+files[] = simple_html_dom.php
 
diff --git a/mobileplugin.install b/mobileplugin.install
index b390a20..ea74e5d 100644
--- a/mobileplugin.install
+++ b/mobileplugin.install
@@ -69,7 +69,6 @@ function mobileplugin_schema() {
  * Installs the module.
  */
 function mobileplugin_install() {
-	drupal_install_schema('mobileplugin');
 	db_query('INSERT INTO {mobileplugin_groups} (name,theme,data) values ("mobile","mobile_garland","")');
 	db_query('INSERT INTO {mobileplugin_rules} (capability,operator,value,group_name,weight) values ("USERAGENT","=~","'
 		.implode("\n", array('Windows NT', 'PPC Mac OS X', 'Intel Mac OS X'))
@@ -86,9 +85,3 @@ function mobileplugin_install() {
 	menu_rebuild();
 }
 
-/**
- * Uninstalls the module.
- */
-function mobileplugin_uninstall() {
-	drupal_uninstall_schema('mobileplugin');
-}
diff --git a/mobileplugin.module b/mobileplugin.module
index bea1b7c..0fcc5a2 100644
--- a/mobileplugin.module
+++ b/mobileplugin.module
@@ -15,7 +15,7 @@ define('MOBILEPLUGIN_ENABLE', 'enable mobile plugin for');
  * Returns the permissions used by the module.
  * @return permissions array
  */
-function mobileplugin_perm() {
+function mobileplugin_permission() {
 	return array(MOBILEPLUGIN_ENABLE);
 }
 
@@ -207,7 +207,7 @@ function mobileplugin_switch() {
 	} else {
 		list($group, $touch) = _mobileplugin_detect_group(MOBILEPLUGIN_MOBILE_GROUP);
 	}
-	setcookie('mobileplugin_group', $group . ',' . ($touch ? '1' : '0'), time() + 8640000, '/');
+	setcookie('mobileplugin_group', $group . ',' . ($touch ? '1' : '0'), REQUEST_TIME + 8640000, '/');
 	drupal_goto(drupal_get_destination());
 }
 
@@ -366,7 +366,7 @@ function _mobileplugin_get_groups() {
 	} else {
 		$grouplist = array();
 		$result = db_query('select name,theme,data from {mobileplugin_groups}');
-		while ($row = db_fetch_array($result)) {
+		foreach ($result as $row) {
 			_mobileplugin_group_setup_in($row);
 			$grouplist[$row['name']] = $row;
 		}
@@ -401,7 +401,7 @@ function _mobileplugin_get_rules() {
 		$rulelist = array();
 		$n = 0;
 		$result = db_query('select capability,operator,value,group_name from {mobileplugin_rules} order by weight asc');
-		while ($row = db_fetch_array($result)) {
+		foreach ($result as $row) {
 			$rulelist[$n] = $row;
 			$n++;
 		}
@@ -417,7 +417,9 @@ function _mobileplugin_get_rules() {
  * @param teaser a flag of teaser view
  * @param page a flag of page view 
  */
-function mobileplugin_nodeapi(&$node, $op, $teaser = false, $page = true) {
+
+//THIS MIGHT NOT BE RIGHT. Node api changed from d6 -> d7. I Guessed.
+function mobileplugin_node_load($node, $types) {
 	global $mobileplugin_group;
 	if ($op == 'view' && $mobileplugin_group != MOBILEPLUGIN_FULL_GROUP) {
 		$element_names = array_filter(array_keys($node->content), 'element_child');
@@ -570,7 +572,7 @@ function _mobileplugin_image_scaled($url, $width, $height) {
 
 			// Try to activate imagecache.
 			if (!file_exists($file)) {
-				drupal_http_request($urlinfo['path'], array(), 'GET', null, 1);
+				drupal_http_request($urlinfo['path'], $options);
 				if (!file_exists($file)) {
 					return array($width, 0);
 				}
@@ -691,7 +693,10 @@ function _mobileplugin_is_inside_paths($target, &$paths) {
 * @param delta the block delta
 * @returns the block data
 */
-function mobileplugin_block($op = 'list', $delta = 0) {
+
+//THIS MIGHT NOT BE RIGHT! Block api changed. I Guessed...again
+function mobileplugin_block_configure($delta = 0) {
+
 	if ($op == 'list') {
 		$blocks[0]['info'] = t('Switch to and from mobile version');
 		$blocks[0]['cache'] = BLOCK_NO_CACHE;
