Fixed problem with repeat definitions and unused definitions