Added pipe support and refactored code

Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
1 job for nkupdates in 57 seconds (queued for 2 seconds)