renamed source files; and refactored impl