small fixes and improved style