Gradually making my own version of the code using Alex's and Angel's as examples