Remove ugly code