Cleaned, still debugging