Smoothed out code

Fixed some of the code done in the livestream. Feel free to make
changes!