Added tests, refactor main() to allow programmatic call.
Added status badges