diff --git a/apps/tasks/ajax/addtask.php b/apps/tasks/ajax/addtask.php
index d2bd46f56a606de178d6f949a8a9cf8ea00a9bf4..c768d3e7d91b85211c9b440d7a7f61f9e1ffadb2 100644
--- a/apps/tasks/ajax/addtask.php
+++ b/apps/tasks/ajax/addtask.php
@@ -14,16 +14,16 @@ if( $calendar === false || $calendar['userid'] != OC_USER::getUser()){
 	exit();
 }
 
-$errors = OC_Task_VTodo::validateRequest($_POST, $l10n);
+$errors = OC_Task_App::validateRequest($_POST);
 if (!empty($errors)) {
 	OC_JSON::error(array('data' => array( 'errors' => $errors )));
 	exit();
 }
 
-$vcalendar = OC_Task_VTodo::createVCalendarFromRequest($_POST);
+$vcalendar = OC_Task_App::createVCalendarFromRequest($_POST);
 $id = OC_Calendar_Object::add($cid, $vcalendar->serialize());
 
-$priority_options = OC_Task_VTodo::getPriorityOptions($l10n);
+$priority_options = OC_Task_App::getPriorityOptions();
 $tmpl = new OC_Template('tasks','part.details');
 $tmpl->assign('priority_options', $priority_options);
 $tmpl->assign('details',$vcalendar->VTODO);
diff --git a/apps/tasks/ajax/edittask.php b/apps/tasks/ajax/edittask.php
index 115f2f078ab3a677df5b069f18870501eeffd100..edfca33833a5c7d5a1c2d8111117287f78607e27 100644
--- a/apps/tasks/ajax/edittask.php
+++ b/apps/tasks/ajax/edittask.php
@@ -20,17 +20,17 @@ if( $calendar === false || $calendar['userid'] != OC_USER::getUser()){
 	exit();
 }
 
-$errors = OC_Task_VTodo::validateRequest($_POST, $l10n);
+$errors = OC_Task_App::validateRequest($_POST);
 if (!empty($errors)) {
 	OC_JSON::error(array('data' => array( 'errors' => $errors )));
 	exit();
 }
 
 $vcalendar = OC_VObject::parse($task['calendardata']);
-OC_Task_VTodo::updateVCalendarFromRequest($_POST, $vcalendar);
+OC_Task_App::updateVCalendarFromRequest($_POST, $vcalendar);
 OC_Calendar_Object::edit($id, $vcalendar->serialize());
 
-$priority_options = OC_Task_VTodo::getPriorityOptions($l10n);
+$priority_options = OC_Task_App::getPriorityOptions();
 $tmpl = new OC_Template('tasks','part.details');
 $tmpl->assign('priority_options', $priority_options);
 $tmpl->assign('details', $vcalendar->VTODO);
diff --git a/apps/tasks/ajax/edittaskform.php b/apps/tasks/ajax/edittaskform.php
index b309413683c7111494c68a959efca21c7a1c85c3..b9c1f700b6145f2c5f39a37e2e710d96b0d84e03 100644
--- a/apps/tasks/ajax/edittaskform.php
+++ b/apps/tasks/ajax/edittaskform.php
@@ -29,7 +29,7 @@ if (isset($details->CATEGORIES)){
 
 $category_options = OC_Calendar_Object::getCategoryOptions($l10n);
 $percent_options = range(0, 100, 10);
-$priority_options = OC_Task_VTodo::getPriorityOptions($l10n);
+$priority_options = OC_Task_App::getPriorityOptions();
 
 $tmpl = new OC_Template('tasks','part.edittaskform');
 $tmpl->assign('category_options', $category_options);
diff --git a/apps/tasks/ajax/getdetails.php b/apps/tasks/ajax/getdetails.php
index 222c426d524ddd7d8fd5d358ebe042600a90c069..2e6e8181f1b2ddd555901b2345aa22ad7b405cf9 100644
--- a/apps/tasks/ajax/getdetails.php
+++ b/apps/tasks/ajax/getdetails.php
@@ -15,7 +15,7 @@ if (!$details){
 	exit;
 }
 
-$priority_options = OC_Task_VTodo::getPriorityOptions($l10n);
+$priority_options = OC_Task_App::getPriorityOptions();
 $tmpl = new OC_Template('tasks','part.details');
 $tmpl->assign('priority_options', $priority_options);
 $tmpl->assign('details',$details->VTODO);
diff --git a/apps/tasks/appinfo/app.php b/apps/tasks/appinfo/app.php
index 24441c7547c76077677455bd4f99ee4c7a102047..657c56c0401c869c26b59b21be7378f70f065514 100644
--- a/apps/tasks/appinfo/app.php
+++ b/apps/tasks/appinfo/app.php
@@ -1,7 +1,7 @@
 <?php
 $l=new OC_L10N('tasks');
 OC::$CLASSPATH['OC_Calendar_Calendar'] = 'apps/calendar/lib/calendar.php';
-OC::$CLASSPATH['OC_Task_VTodo'] = 'apps/tasks/lib/vtodo.php';
+OC::$CLASSPATH['OC_Task_App'] = 'apps/tasks/lib/app.php';
 
 OC_App::register( array(
   'order' => 11,
diff --git a/apps/tasks/index.php b/apps/tasks/index.php
index 145ec145aead7b1e8e85fd4f2ec99630ae7fca00..e2f559dfebcd1a2a61c1d9035d0db4e7bfb7960d 100644
--- a/apps/tasks/index.php
+++ b/apps/tasks/index.php
@@ -46,7 +46,7 @@ OC_UTIL::addStyle('tasks', 'style');
 OC_APP::setActiveNavigationEntry('tasks_index');
 
 $l10n = new OC_L10N('tasks');
-$priority_options = OC_Task_VTodo::getPriorityOptions($l10n);
+$priority_options = OC_Task_App::getPriorityOptions();
 $output = new OC_Template('tasks', 'tasks', 'user');
 $output->assign('tasks', $tasks);
 $output->assign('details', $details);
diff --git a/apps/tasks/lib/app.php b/apps/tasks/lib/app.php
new file mode 100644
index 0000000000000000000000000000000000000000..92be59442440a84e6ec39ed1d93f101aab34fa21
--- /dev/null
+++ b/apps/tasks/lib/app.php
@@ -0,0 +1,162 @@
+<?php
+/**
+ * ownCloud - Calendar
+ *
+ * @author Bart Visscher
+ * @copyright 2011 Bart Visscher bartv@thisnet.nl
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+/**
+ * This class manages our tasks
+ */
+OC_Task_App::$l10n = new OC_L10N('tasks');
+class OC_Task_App {
+	public static $l10n;
+
+	public static function getPriorityOptions()
+	{
+		return array(
+			''  => self::$l10n->t('Unspecified'),
+			'1' => self::$l10n->t('1=highest'),
+			'2' => '2',
+			'3' => '3',
+			'4' => '4',
+			'5' => self::$l10n->t('5=medium'),
+			'6' => '6',
+			'7' => '7',
+			'8' => '8',
+			'9' => self::$l10n->t('9=lowest'),
+		);
+	}
+
+	public static function validateRequest($request)
+	{
+		$errors = array();
+		if($request['summary'] == ''){
+			$errors['summary'] = self::$l10n->t('Empty Summary');
+		}
+
+		if(isset($request['categories']) && !is_array($request['categories'])){
+			$errors['categories'] = self::$l10n->t('Not an array');
+		}
+
+		try {
+			$timezone = OC_Preferences::getValue(OC_USER::getUser(), "calendar", "timezone", "Europe/London");
+			$timezone = new DateTimeZone($timezone);
+			new DateTime($request['due'], $timezone);
+		} catch (Exception $e) {
+			$errors['due'] = self::$l10n->t('Invalid date/time');
+		}
+
+		if ($request['percent_complete'] < 0 || $request['percent_complete'] > 100){
+			$errors['percent_complete'] = self::$l10n->t('Invalid percent complete');
+		}
+		if ($request['percent_complete'] == 100 && !empty($request['completed'])){
+			try {
+				$timezone = OC_Preferences::getValue(OC_USER::getUser(), "calendar", "timezone", "Europe/London");
+				$timezone = new DateTimeZone($timezone);
+				new DateTime($request['completed'], $timezone);
+			} catch (Exception $e) {
+				$errors['completed'] = self::$l10n->t('Invalid date/time');
+			}
+		}
+
+		$priority_options = self::getPriorityOptions();
+		if (!in_array($request['priority'], array_keys($priority_options))) {
+			$errors['priority'] = self::$l10n->t('Invalid priority');
+		}
+		return $errors;
+	}
+
+	public static function createVCalendarFromRequest($request)
+	{
+		$vcalendar = new Sabre_VObject_Component('VCALENDAR');
+		$vcalendar->add('PRODID', 'ownCloud Calendar');
+		$vcalendar->add('VERSION', '2.0');
+
+		$now = new DateTime();
+
+		$vtodo = new Sabre_VObject_Component('VTODO');
+		$vcalendar->add($vtodo);
+
+		$created = new Sabre_VObject_Element_DateTime('CREATED');
+		$created->setDateTime($now, Sabre_VObject_Element_DateTime::UTC);
+		$vtodo->add($created);
+
+		$uid = self::createUID();
+		$vtodo->add('UID',$uid);
+
+		return self::updateVCalendarFromRequest($request, $vcalendar);
+	}
+
+	public static function updateVCalendarFromRequest($request, $vcalendar)
+	{
+		$summary = $request['summary'];
+		$categories = isset($request["categories"]) ? $request["categories"] : array();
+		$priority = $request['priority'];
+		$percent_complete = $request['percent_complete'];
+		$completed = $request['completed'];
+		$location = $request['location'];
+		$due = $request['due'];
+		$description = $request['description'];
+
+		$vtodo = $vcalendar->VTODO;
+
+		$vtodo->setDateTime('LAST-MODIFIED', 'now', Sabre_VObject_Element_DateTime::UTC);
+		$vtodo->setDateTime('DTSTAMP', 'now', Sabre_VObject_Element_DateTime::UTC);
+		$vtodo->setString('SUMMARY', $summary);
+
+		$vtodo->setString('LOCATION', $location);
+		$vtodo->setString('DESCRIPTION', $description);
+		$vtodo->setString('CATEGORIES', join(',', $categories));
+		$vtodo->setString('PRIORITY', $priority);
+
+		if ($due) {
+			$timezone = OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'timezone', date_default_timezone_get());
+			$timezone = new DateTimeZone($timezone);
+			$due = new DateTime($due, $timezone);
+			$vtodo->setDateTime('DUE', $due);
+		} else {
+			unset($vtodo->DUE);
+		}
+
+		if (!empty($percent_complete)) {
+			$vtodo->setString('PERCENT-COMPLETE', $percent_complete);
+		}else{
+			$vtodo->__unset('PERCENT-COMPLETE');
+		}
+
+		if ($percent_complete == 100){
+			if (!$completed){
+				$completed = 'now';
+			}
+		} else {
+			$completed = null;
+		}
+		if ($completed) {
+			$timezone = OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'timezone', date_default_timezone_get());
+			$timezone = new DateTimeZone($timezone);
+			$completed = new DateTime($completed, $timezone);
+			$vtodo->setDateTime('COMPLETED', $completed);
+		} else {
+			unset($vtodo->COMPLETED);
+		}
+
+		return $vcalendar;
+	}
+}
+
diff --git a/apps/tasks/lib/vtodo.php b/apps/tasks/lib/vtodo.php
index 967f5b87a5448c9754a1cdba2aca2b7e6da511bd..dc2bfaf964cfe691b938f95d19317dac419c002a 100644
--- a/apps/tasks/lib/vtodo.php
+++ b/apps/tasks/lib/vtodo.php
@@ -21,138 +21,7 @@
  */
 
 /**
- * This class manages our calendars
+ * This class manages our tasks
  */
 class OC_Task_VTodo extends OC_Calendar_Object{
-	public static function getPriorityOptions($l10n)
-	{
-		return array(
-			''  => $l10n->t('Unspecified'),
-			'1' => $l10n->t('1=highest'),
-			'2' => '2',
-			'3' => '3',
-			'4' => '4',
-			'5' => $l10n->t('5=medium'),
-			'6' => '6',
-			'7' => '7',
-			'8' => '8',
-			'9' => $l10n->t('9=lowest'),
-		);
-	}
-	public static function validateRequest($request, $l10n=null)
-	{
-		$errors = array();
-		if($request['summary'] == ''){
-			$errors['summary'] = $l10n->t('Empty Summary');
-		}
-
-		if(isset($request['categories']) && !is_array($request['categories'])){
-			$errors['categories'] = $l10n->t('Not an array');
-		}
-
-		try {
-			$timezone = OC_Preferences::getValue(OC_USER::getUser(), "calendar", "timezone", "Europe/London");
-			$timezone = new DateTimeZone($timezone);
-			new DateTime($request['due'], $timezone);
-		} catch (Exception $e) {
-			$errors['due'] = $l10n->t('Invalid date/time');
-		}
-
-		if ($request['percent_complete'] < 0 || $request['percent_complete'] > 100){
-			$errors['percent_complete'] = $l10n->t('Invalid percent complete');
-		}
-		if ($request['percent_complete'] == 100 && !empty($request['completed'])){
-			try {
-				$timezone = OC_Preferences::getValue(OC_USER::getUser(), "calendar", "timezone", "Europe/London");
-				$timezone = new DateTimeZone($timezone);
-				new DateTime($request['completed'], $timezone);
-			} catch (Exception $e) {
-				$errors['completed'] = $l10n->t('Invalid date/time');
-			}
-		}
-
-		$priority_options = OC_Task_VTodo::getPriorityOptions($l10n);
-		if (!in_array($request['priority'], array_keys($priority_options))) {
-			$errors['priority'] = $l10n->t('Invalid priority');
-		}
-		return $errors;
-	}
-
-	public static function createVCalendarFromRequest($request)
-	{
-		$vcalendar = new Sabre_VObject_Component('VCALENDAR');
-		$vcalendar->add('PRODID', 'ownCloud Calendar');
-		$vcalendar->add('VERSION', '2.0');
-
-		$now = new DateTime();
-
-		$vtodo = new Sabre_VObject_Component('VTODO');
-		$vcalendar->add($vtodo);
-
-		$created = new Sabre_VObject_Element_DateTime('CREATED');
-		$created->setDateTime($now, Sabre_VObject_Element_DateTime::UTC);
-		$vtodo->add($created);
-
-		$uid = self::createUID();
-		$vtodo->add('UID',$uid);
-
-		return self::updateVCalendarFromRequest($request, $vcalendar);
-	}
-
-	public static function updateVCalendarFromRequest($request, $vcalendar)
-	{
-		$summary = $request['summary'];
-		$categories = isset($request["categories"]) ? $request["categories"] : array();
-		$priority = $request['priority'];
-		$percent_complete = $request['percent_complete'];
-		$completed = $request['completed'];
-		$location = $request['location'];
-		$due = $request['due'];
-		$description = $request['description'];
-
-		$vtodo = $vcalendar->VTODO;
-
-		$vtodo->setDateTime('LAST-MODIFIED', 'now', Sabre_VObject_Element_DateTime::UTC);
-		$vtodo->setDateTime('DTSTAMP', 'now', Sabre_VObject_Element_DateTime::UTC);
-		$vtodo->setString('SUMMARY', $summary);
-
-		$vtodo->setString('LOCATION', $location);
-		$vtodo->setString('DESCRIPTION', $description);
-		$vtodo->setString('CATEGORIES', join(',', $categories));
-		$vtodo->setString('PRIORITY', $priority);
-
-		if ($due) {
-			$timezone = OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'timezone', date_default_timezone_get());
-			$timezone = new DateTimeZone($timezone);
-			$due = new DateTime($due, $timezone);
-			$vtodo->setDateTime('DUE', $due);
-		} else {
-			unset($vtodo->DUE);
-		}
-
-		if (!empty($percent_complete)) {
-			$vtodo->setString('PERCENT-COMPLETE', $percent_complete);
-		}else{
-			$vtodo->__unset('PERCENT-COMPLETE');
-		}
-
-		if ($percent_complete == 100){
-			if (!$completed){
-				$completed = 'now';
-			}
-		} else {
-			$completed = null;
-		}
-		if ($completed) {
-			$timezone = OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'timezone', date_default_timezone_get());
-			$timezone = new DateTimeZone($timezone);
-			$completed = new DateTime($completed, $timezone);
-			$vtodo->setDateTime('COMPLETED', $completed);
-		} else {
-			unset($vtodo->COMPLETED);
-		}
-
-		return $vcalendar;
-	}
 }
-