diff --git a/lib/template.php b/lib/template.php
index fc3c6b6d54f3fcddfc2a0a868153b40cd3c622f8..646d9b11235ddd221e2d8993a93b5a28d851009c 100644
--- a/lib/template.php
+++ b/lib/template.php
@@ -24,7 +24,7 @@
 require_once __DIR__.'/template/functions.php';
 
 /**
- * This class provides the templates for owncloud.
+ * This class provides the templates for ownCloud.
  */
 class OC_Template extends \OC\Template\Base {
 	private $renderas; // Create a full page?
@@ -34,7 +34,7 @@ class OC_Template extends \OC\Template\Base {
 	/**
 	 * @brief Constructor
 	 * @param string $app app providing the template
-	 * @param string $file name of the template file (without suffix)
+	 * @param string $name of the template file (without suffix)
 	 * @param string $renderas = ""; produce a full page
 	 * @return OC_Template object
 	 *
@@ -172,7 +172,7 @@ class OC_Template extends \OC\Template\Base {
 	/**
 	 * @brief Add a custom element to the header
 	 * @param string $tag tag name of the element
-	 * @param array $attributes array of attrobutes for the element
+	 * @param array $attributes array of attributes for the element
 	 * @param string $text the text content for the element
 	 */
 	public function addHeader( $tag, $attributes, $text='') {
@@ -264,8 +264,8 @@ class OC_Template extends \OC\Template\Base {
 
 	/**
 		* @brief Print a fatal error page and terminates the script
-		* @param string $error The error message to show
-		* @param string $hint An optional hint message 
+		* @param string $error_msg The error message to show
+		* @param string $hint An optional hint message
 		* Warning: All data passed to $hint needs to get sanitized using OC_Util::sanitizeHTML
 		*/
 	public static function printErrorPage( $error_msg, $hint = '' ) {
diff --git a/lib/template/cssresourcelocator.php b/lib/template/cssresourcelocator.php
index e27296d9f5f687187e2cb15dc73a09fd246fa667..8e7831ca549fa615d87cbb4176d27a813d058d55 100644
--- a/lib/template/cssresourcelocator.php
+++ b/lib/template/cssresourcelocator.php
@@ -21,10 +21,10 @@ class CSSResourceLocator extends ResourceLocator {
 		}
 		$app = substr($style, 0, strpos($style, '/'));
 		$style = substr($style, strpos($style, '/')+1);
-		$app_path = OC_App::getAppPath($app);
+		$app_path = \OC_App::getAppPath($app);
 		$app_url = $this->webroot . '/index.php/apps/' . $app;
 		if ($this->appendIfExist($app_path, $style.$this->form_factor.'.css', $app_url)
-			|| $this->appendIfExist($app_path, $style.'.css', $ap_url)
+			|| $this->appendIfExist($app_path, $style.'.css', $app_url)
 		) {
 			return;
 		}
diff --git a/lib/template/jsresourcelocator.php b/lib/template/jsresourcelocator.php
index a1382edf2d5ecbe9a1dfcad01e47b6c231c37999..f8fe3817ce60a4d40151d5516ae505d1f27f67a5 100644
--- a/lib/template/jsresourcelocator.php
+++ b/lib/template/jsresourcelocator.php
@@ -28,10 +28,10 @@ class JSResourceLocator extends ResourceLocator {
 		}
 		$app = substr($script, 0, strpos($script, '/'));
 		$script = substr($script, strpos($script, '/')+1);
-		$app_path = OC_App::getAppPath($app);
-		$app_url = OC_App::getAppWebPath($app);
+		$app_path = \OC_App::getAppPath($app);
+		$app_url = \OC_App::getAppWebPath($app);
 		if ($this->appendIfExist($app_path, $script.$this->form_factor.'.js', $app_url)
-			|| $this->appendIfExist($app_path, $script.'.js', $ap_url)
+			|| $this->appendIfExist($app_path, $script.'.js', $app_url)
 		) {
 			return;
 		}
diff --git a/lib/template/templatefilelocator.php b/lib/template/templatefilelocator.php
index eeb27c139a76c257a5bd222f422305c482f78a26..cc5e88771ff60bdc1f2b0926f41f6a6bcbd4d6a3 100644
--- a/lib/template/templatefilelocator.php
+++ b/lib/template/templatefilelocator.php
@@ -11,6 +11,7 @@ namespace OC\Template;
 class TemplateFileLocator {
 	protected $form_factor;
 	protected $dirs;
+	private $path;
 
 	public function __construct( $form_factor, $dirs ) {
 		$this->form_factor = $form_factor;