Revamp code to be like book, simplfied

Changed code to be more like the book, simplified descriptions