Added -Xlint option on javac. Fixed deprecation warning. All tests pass