some initial clean-up and more improvments