Code cleanup, and start on Reliability module