more improvements and cleaning