merge an assorment of calc84maniac's fixes.