Made more readable. Still struggling on fixing bug where new nodes are null