Cleaned the dirty code