Added missing test, removed unused code