Tests, coverage and debug tools

Tests

Debug