code and codingstyle cleanup