refactors smoothie program and adds more comments