Refactored pipelines checks, email functionality, minor cleanups