some code style issues improved