Working Rollsum port, with working unit tests too.