General removing of ugly code parts