a few more code cleaning