document headers
add tests for logging functions
fix documentation