Structured the code a little