code cleanup according to python code styles.