Fixes

This is a lot of various bugfixes to the module, with a couple enhancements. 
Rather than submitting 9 different pull requests, I've bundled them up into a single one. Each commit has a description of what the commit is for.

I did not fix any of these issues on the redhat side, as I don't have a redhat box readily available to test on. However many of these issues are present on the redhat side as well (unquoted parameters, exposed environment variables, difficult to read init script, etc).