Added some analysis functions.