Int calc, refactor string, cleans

Add integral calculation, refactor output strings and little clean up in
code.