some clean code. Lack of tests...