Clean unused functions
Fix Exception
Improve test coverage (from 70% to 86%)