Create pipeline class.
Use pipeline class.
Remove unused function.
Use __str__ methods.