Organize the code a bit more