Fixed a small conditional statement.
And removed an unused method.