Changed constructor to initialize root to null instead of an empty node.