Updated putObject method and removed unused methods