Cleaned up the directory finding and added history to the console.