Revamp. 

Copied from BackupBoAInterestCals playground. Better version.