Refs #22 cleaned up code and reduce stacktraces in log