Vastly improved readability

Added comments, changed variable names. Made the code much more
presentable