add logging, make classes final, refactor test to proper package