Extracting functions.
Extracted to functions.
Pushing everything into fuctions.
Renamed functions.
Expanded code to add binary packages.