Cleaned up code so that no warnings would be produced on compilation.