Stream usage optimisations

Added using statements where needed and changed a few method where
streams were being left open
Removed If statement from previous check in.