minor random fixes, removing old and commented code, minor bit of cleaning and reorganizing