Removed unused functions and tests