Add some analysis functions.