Added some comments to the functions and a clever reccomendation function