Arranging the code