diff --git a/ase/calculators/jacapo/changed.py b/ase/calculators/jacapo/changed.py
index 7ebfcc3..b196c2b 100644
--- a/ase/calculators/jacapo/changed.py
+++ b/ase/calculators/jacapo/changed.py
@@ -4,6 +4,8 @@ import numpy as np
 import logging
 log = logging.getLogger('Jacapo')
 
+import ase.dft.kpoints
+
 '''
 provides functions to determine if an input parameter has changed.
 '''
@@ -25,8 +27,9 @@ def kpts_changed(calc, x):
     '''
     #chadi-cohen
     if isinstance(x, str):
-        exec('from ase.dft.kpoints import %s' % x)
-        listofkpts = eval(x)
+        #exec('from ase.dft.kpoints import %s' % x)
+        #listofkpts = eval(x)
+        listofkpts = getattr(ase.dft.kpoints, x)
     #monkhorst-pack grid
     elif np.array(x).shape == (3,):
         from ase.dft.kpoints import monkhorst_pack
diff --git a/ase/calculators/jacapo/jacapo.py b/ase/calculators/jacapo/jacapo.py
index 45d3eb5..61f5a53 100644
--- a/ase/calculators/jacapo/jacapo.py
+++ b/ase/calculators/jacapo/jacapo.py
@@ -39,6 +39,8 @@ except ImportError: #probably an old python before 2.5
 import logging
 log = logging.getLogger('Jacapo')
 
+import ase.dft.kpoints
+
 handler = logging.StreamHandler()
 if sys.version_info < (2,5): # no funcName in python 2.4
     formatstring = ('%(levelname)-10s '
@@ -349,8 +351,11 @@ class Jacapo:
                 continue
 
             #now check for valid input
-            validf = 'validate.valid_%s' % key
-            valid = eval('%s(kwargs[key])' % validf)
+            #validf = 'validate.valid_%s' % key
+            #valid = eval('%s(kwargs[key])' % validf)
+
+            validf = getattr(validate, 'valid_%s' % key)
+            valid = validf(kwargs[key])
             if not valid:
                 s = 'Warning invalid input detected for key "%s" %s'
                 log.warn(s % (key,
@@ -359,9 +364,11 @@ class Jacapo:
 
             #now see if key has changed
             if key in self.pars:
-                changef = 'changed.%s_changed' % key
+                #changef = 'changed.%s_changed' % key
+                changef = getattr(changed, '%s_changed' % key)
                 if os.path.exists(self.get_nc()):
-                    notchanged = not eval('%s(self,kwargs[key])' % changef)
+                    notchanged = not changef(self, kwargs[key])
+                    #notchanged = not eval('%s(self,kwargs[key])' % changef)
                 else:
                     notchanged = False
                 log.debug('%s notchanged = %s' % (key, notchanged))
@@ -403,7 +410,8 @@ class Jacapo:
         # functions.
         for key in self.pars:
             if self.pars_uptodate[key] is False:
-                setf = 'set_%s' % key
+                setf = getattr(self, 'set_%s' % key)
+                #setf = 'set_%s' % key
 
                 if self.pars[key] is None:
                     continue
@@ -413,9 +421,11 @@ class Jacapo:
                 log.debug('key = %s' % str(self.pars[key]))
 
                 if isinstance(self.pars[key], dict):
-                    eval('self.%s(**self.pars[key])' % setf)
+                    setf(**self.pars[key])
+                    #eval('self.%s(**self.pars[key])' % setf)
                 else:
-                    eval('self.%s(self.pars[key])' % setf)
+                    setf(self.pars[key])
+                    #eval('self.%s(self.pars[key])' % setf)
 
                 self.pars_uptodate[key] = True #update the changed flag
 
@@ -433,9 +443,10 @@ class Jacapo:
         log.debug('Updating parameters')
 
         for key in self.default_input:
-            getf = 'self.get_%s()' % key
+            #getf = 'self.get_%s()' % key
             log.debug('getting key: %s' % key)
-            self.pars[key] = eval(getf)
+            #self.pars[key] = eval(getf)
+            self.pars[key] = getattr(self, 'get_%' % key)
             self.pars_uptodate[key] = True
         return self.pars
 
@@ -925,8 +936,9 @@ than density cutoff %i' % (pw, dw))
 
         #chadi-cohen
         if isinstance(kpts, str):
-            exec('from ase.dft.kpoints import %s' % kpts)
-            listofkpts = eval(kpts)
+            #exec('from ase.dft.kpoints import %s' % kpts)
+            #listofkpts = eval(kpts)
+            listofkpts = getattr(ase.dft.kpoints, kpts)
             gridtype = kpts #stored in ncfile
             #uc = self.get_atoms().get_cell()
             #listofkpts = np.dot(ccgrid,np.linalg.inv(uc.T))
@@ -1757,6 +1769,7 @@ than density cutoff %i' % (pw, dw))
             mdos['energywidth'] = v.EnergyWidth
             mdos['numberenergypoints'] = v.NumberEnergyPoints
             mdos['cutoffradius'] = v.CutoffRadius
+            # XXXXX eval?
             mdos['mcenters'] = eval(v.mcenters)
 
         nc.close()
