Minor changes to analysis functions