Add source test.
Allow using printf style, if available.
Remove variables that aren't used to allow testing. Also, use sprintf style for testing left and right.
Fixes and corrections.