Factor ips function into utils module.
Merge remote-tracking branch 'origin/master'