Removed duplicate files, fixed some tests