 
 			# looping through all files
 			for file in files
-				
-				# read file content and initialize dependencies array
+
+				# read file content and initialize dependencies
+				# and extends array
 				raw = fs.readFileSync file, "utf-8"
 				dependencies = []
-				
+				baseclasses = []
+
 				# assemble some information about the file
-				filepath       = file.replace( @src, "" ).substr 1
-				filename       = /\w+\.\w+/.exec( filepath )[ 0 ]
-				filefolder     = filepath.replace( "/#{filename}", "") + "/"
-
+				filepath   = file.replace( @src, "" ).substr 1
+				filename   = /\w+\.\w+/.exec( filepath )[ 0 ]
+				filefolder = filepath.replace( "/#{filename}", "") + "/"
+				namespace  = ""
 				# if the file is in the top level
 				if filepath.indexOf("/") is -1
 					filefolder = ""

						# the parser thing, adding the package the headers
						# declarations
						repl = "pkg( '#{namespace}' ).$3 = $2 $3"
						repl += "$4" if rgx_ext.test raw
						raw = raw.replace new RegExp( rgx, "gm" ), repl
					
					# assemble some more infos about the file.
					#		classname: ClassName
					#		namespace: package.subpackage
					#		classpath: package.subpackage.ClassName
					classname = raw.match( new RegExp( rgx, "m") )[2]
					
					if namespace is ""
						classpath = classname
					else
						classpath = "#{namespace}.#{classname}"
				
				# if the file was already buffered, prints a warning msg,
				# skip it and move on

			initd.push file

			# if theres no dependencies, go to next file
			continue if !file.dependencies.length && !file.baseclasses.length
			
			# otherwise loop thourgh all file dependencies
			for dependency, index in file.dependencies
