Removing old code and warnings