Cleaned Code