Moved common promise logic for every, take, exists to extensions file
restructure project to a cleaner format.