diff --git a/apps/files_sharing/appinfo/update.php b/apps/files_sharing/appinfo/update.php
index ebeeae10d2ca28b49a9fdf42c23813fa89ba81ce..c79a2291e92ef55cfe80eaef9c56eff2f52dafd9 100644
--- a/apps/files_sharing/appinfo/update.php
+++ b/apps/files_sharing/appinfo/update.php
@@ -18,7 +18,7 @@ if (version_compare($installedVersion, '0.4', '<')) {
 			$users[] = $row['share_with'];
 			$shares[$row['id']] = $row['file_target'];
 		} else if ($row['share_type'] === "1" && ($row['item_type'] === 'file' || $row['item_type'] === 'folder')) {
-			//collect all group sharesX
+			//collect all group shares
 			$users = array_merge($users, \OC_group::usersInGroup($row['share_with']));
 			$shares[$row['id']] = $row['file_target'];
 		} else if ($row['share_type'] === "2") {
@@ -48,7 +48,9 @@ if (version_compare($installedVersion, '0.4', '<')) {
 		$statement .= ' END WHERE `id` IN (' . $ids . ')';
 
 		$query = OCP\DB::prepare($statement);
+
 		$query->execute(array());
+
 	}
 
 }
diff --git a/apps/files_sharing/lib/helper.php b/apps/files_sharing/lib/helper.php
index 1381c0002d342c08b5a99f11b2b420b8ac75bec3..e2780e98935235dfb866950362c6aceda8555b48 100644
--- a/apps/files_sharing/lib/helper.php
+++ b/apps/files_sharing/lib/helper.php
@@ -2,6 +2,9 @@
 
 namespace OCA\Files_Sharing;
 
+use OC_Config;
+use PasswordHash;
+
 class Helper {
 
 	/**
@@ -26,9 +29,6 @@ class Helper {
 			exit;
 		}
 
-		$type = $linkItem['item_type'];
-		$fileSource = $linkItem['file_source'];
-		$shareOwner = $linkItem['uid_owner'];
 		$rootLinkItem = \OCP\Share::resolveReShare($linkItem);
 		$path = null;
 		if (isset($rootLinkItem['uid_owner'])) {
@@ -61,7 +61,6 @@ class Helper {
 		}
 
 		$basePath = $path;
-		$rootName = basename($path);
 
 		if ($relativePath !== null && \OC\Files\Filesystem::isReadable($basePath . $relativePath)) {
 			$path .= \OC\Files\Filesystem::normalizePath($relativePath);
diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php
index eedd279bf2b91578dc606836aad78f99307bd61f..b8a799f720d022aaef30dc94fe24d2e45583d90c 100644
--- a/apps/files_sharing/lib/sharedstorage.php
+++ b/apps/files_sharing/lib/sharedstorage.php
@@ -299,14 +299,14 @@ class Shared extends \OC\Files\Storage\Common {
 	}
 
 	/**
-	 * @brief rename a shared foder/file
+	 * @brief rename a shared folder/file
 	 * @param string $sourcePath
 	 * @param string $targetPath
 	 * @return bool
 	 */
 	private function renameMountPoint($sourcePath, $targetPath) {
 
-		// it shoulbn't be possible to move a Shared storage into another one
+		// it shouldn't be possible to move a Shared storage into another one
 		list($targetStorage, ) = \OC\Files\Filesystem::resolvePath($targetPath);
 		if ($targetStorage instanceof \OC\Files\Storage\Shared) {
 			\OCP\Util::writeLog('file sharing',
@@ -452,6 +452,7 @@ class Shared extends \OC\Files\Storage\Common {
 			list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath($source);
 			return $storage->free_space($internalPath);
 		}
+		return \OC\Files\SPACE_UNKNOWN;
 	}
 
 	public function getLocalFile($path) {