Logic error fix on changing chart units when called onResume and some basic cleanup.