incorporate changes from PR #273 and remove duplicate files