Commented the code and changed the multiplication into bit shifts