 		throw new Error "Path does not exist: #{opts.path}"
 	
 	# check if crystal config exists
-	config = crystal.config opts.path
+	config = this.config opts.path
 	if config != false
 		throw new Error "Crystal has already been initialized in: #{opts.path}"
 	

	console.log 'Crystal initialization is complete.'.green
	
init = (opts) ->
	
	# get path
	opts.path = opts._[1] || opts.path || this.path || process.cwd()

	# add modules to config
	if opts.modules
		config.modules = {}
		config.imports = {}
		config.outputs = []
		for module_name of opts.modules
			config.modules[module_name] = 'master'
			for imported in opts.modules[module_name]
				import_name = module_name.split '.'
				import_name = import_name[import_name.length-1]
				config.imports[import_name] = "#{module_name}.#{imported}"
	
	# convert config obj to yaml doc
	config = yaml.safeDump config
