Organized teh code