Added connectDB and several small changes

Added ability to add custom headers to email method. Changed default HTTP code for quit method and added connectDB method.