De-ugly code