Adding files from original implementation