Organized the functions in a way that doesn't annoy me