smartZ v1.0: code cleanup