Better variable names
Move some code into a function