Tidied newline code
Removed notify out of functions