cleanup primitive definitions