Cleaned up refactored code for streaming job