Clean core/test code