Slight organization of code