Organized code a little