removed densxy stuff and merged hist functions into other files