Organized some code