fix variable type and function name changes from Kohana update
delete/move files when item is deleted
replace tabs with spaces in item delete function