Clean up optional logging and add more tests