removing some build warnings and some pointer to references