Fixed some more warnings and resolved deprecated methods