Contains the "heart" of FIW. No user interface here!