Organizing the code a little bit