Solved warnings about deprecated methods and duplicate constant definition

This solves bug ticket 86