diff --git a/lib/api.php b/lib/api.php
index b1176a07077968ff8953d20cef8760180f5b79d4..2203d86ac94110f9e988b7b21aa0f2d4f707d709 100644
--- a/lib/api.php
+++ b/lib/api.php
@@ -62,7 +62,7 @@ class OC_API {
 			}
 		}
 		// include core routes
-		require_once(OC::$SERVERROOT.'core/routes.php');
+		require_once(OC::$SERVERROOT.'ocs/routes.php');
 		
 		$name = $parameters['_name'];
 		$response = array();
diff --git a/lib/ocs/activity.php b/lib/ocs/activity.php
new file mode 100644
index 0000000000000000000000000000000000000000..3b090376e720b9b9083f041b3540b5d357693e79
--- /dev/null
+++ b/lib/ocs/activity.php
@@ -0,0 +1,11 @@
+<?php
+
+class OC_OCS_Activity {
+
+	public static function activityGet($parameters){
+		// TODO
+	}
+	
+}
+
+?>
\ No newline at end of file
diff --git a/lib/ocs/cloud.php b/lib/ocs/cloud.php
new file mode 100644
index 0000000000000000000000000000000000000000..d0cd72e98c55362897e0f990e1935ea6f455c13a
--- /dev/null
+++ b/lib/ocs/cloud.php
@@ -0,0 +1,97 @@
+<?php
+
+class OC_OCS_Cloud {
+
+	public static function systemwebapps($parameters){
+		$login = OC_OCS::checkpassword();
+		$apps = OC_App::getEnabledApps();
+		$values = array();
+		foreach($apps as $app) {
+			$info = OC_App::getAppInfo($app);
+			if(isset($info['standalone'])) {
+				$newvalue = array('name'=>$info['name'],'url'=>OC_Helper::linkToAbsolute($app,''),'icon'=>'');
+				$values[] = $newvalue;
+			}
+		}
+		return $values;
+	}
+	
+	public static function getQuota($parameters){
+		$login=OC_OCS::checkpassword();
+		if(OC_Group::inGroup($login, 'admin') or ($login==$parameters['user'])) {
+
+			if(OC_User::userExists($parameters['user'])){
+				// calculate the disc space
+				$user_dir = '/'.$parameters['user'].'/files';
+				OC_Filesystem::init($user_dir);
+				$rootInfo=OC_FileCache::get('');
+				$sharedInfo=OC_FileCache::get('/Shared');
+				$used=$rootInfo['size']-$sharedInfo['size'];
+				$free=OC_Filesystem::free_space();
+				$total=$free+$used;
+				if($total==0) $total=1;  // prevent division by zero
+				$relative=round(($used/$total)*10000)/100;
+
+				$xml=array();
+				$xml['quota']=$total;
+				$xml['free']=$free;
+				$xml['used']=$used;
+				$xml['relative']=$relative;
+
+				return $xml;
+			}else{
+				return 300;
+			}
+		}else{
+			return 300;
+		}
+	}
+	
+	public static function setQuota($parameters){
+		$login=OC_OCS::checkpassword();
+		if(OC_Group::inGroup($login, 'admin')) {
+		
+			// todo
+			// not yet implemented
+			// add logic here
+			error_log('OCS call: user:'.$parameters['user'].' quota:'.$parameters['quota']);
+			
+			$xml=array();
+			return $xml;
+		}else{
+			return 300;
+		}
+	}
+	
+	public static function getPublickey($parameters){
+		$login=OC_OCS::checkpassword();
+
+		if(OC_User::userExists($parameters['user'])){
+			// calculate the disc space
+			// TODO
+			return array();
+		}else{
+			return 300;
+		}
+	}
+	
+	public static function getPrivatekey($parameters){
+		$login=OC_OCS::checkpassword();
+        if(OC_Group::inGroup($login, 'admin') or ($login==$parameters['user'])) {
+
+                if(OC_User::userExists($user)){
+                        // calculate the disc space
+                        $txt='this is the private key of '.$parameters['user'];
+                        echo($txt);
+                }else{
+                        echo self::generateXml('', 'fail', 300, 'User does not exist');
+                }
+        }else{
+                echo self::generateXml('', 'fail', 300, 'You don´t have permission to access this ressource.');
+        }
+	}
+	
+	
+}
+
+?>
\ No newline at end of file
diff --git a/lib/ocs/config.php b/lib/ocs/config.php
new file mode 100644
index 0000000000000000000000000000000000000000..b736abe3b9cf5752222267c61b2555bc721a5ef6
--- /dev/null
+++ b/lib/ocs/config.php
@@ -0,0 +1,16 @@
+<?php
+
+class OC_OCS_Config {
+	
+	public static function apiConfig($parameters){
+		$xml['version'] = '1.7';
+		$xml['website'] = 'ownCloud';
+		$xml['host'] = OCP\Util::getServerHost();
+		$xml['contact'] = '';
+		$xml['ssl'] = 'false';
+		return $xml;
+	}
+	
+}
+
+?>
\ No newline at end of file
diff --git a/lib/ocs/person.php b/lib/ocs/person.php
new file mode 100644
index 0000000000000000000000000000000000000000..f4e4be5ee0913045c7ba14c8068111fa4438f9fd
--- /dev/null
+++ b/lib/ocs/person.php
@@ -0,0 +1,22 @@
+<?php
+
+class OC_OCS_Person {
+
+	public static function check($parameters){
+	
+		if($parameters['login']<>''){
+			if(OC_User::login($parameters['login'],$parameters['password'])){
+				$xml['person']['personid'] = $parameters['login'];
+				return $xml;
+			}else{
+				return 102;
+			}
+		}else{
+			return 101;
+		}
+		
+	}
+	
+}
+
+?>
\ No newline at end of file
diff --git a/lib/ocs/privatedata.php b/lib/ocs/privatedata.php
new file mode 100644
index 0000000000000000000000000000000000000000..cb62d60a8d3a284a3e904c2d16cb96c94de32887
--- /dev/null
+++ b/lib/ocs/privatedata.php
@@ -0,0 +1,37 @@
+<?php
+
+class OC_OCS_Privatedata {
+
+	public static function privatedataGet($parameters){
+		$user = OC_OCS::checkpassword();
+		$result = OC_OCS::getData($user,$app,$key);
+		$xml=  array();
+		foreach($result as $i=>$log) {
+			$xml[$i]['key']=$log['key'];
+			$xml[$i]['app']=$log['app'];
+			$xml[$i]['value']=$log['value'];
+		}
+		return $xml;
+		//TODO: replace 'privatedata' with 'attribute' once a new libattice has been released that works with it
+	}
+	
+	public static function privatedataSet($parameters){
+		$user = OC_OCS::checkpassword();
+		if(OC_OCS::setData($user,$app,$key,$value)){
+			return 100;
+		}
+	}
+	
+	public static function privatedataDelete($parameteres){
+		$user = OC_OCS::checkpassword();
+		if($key=="" or $app==""){
+			return; //key and app are NOT optional here
+		}
+		if(OC_OCS::deleteData($user,$app,$key)){
+			return 100;
+		}
+	}
+	
+}
+
+?>
\ No newline at end of file