I'm so sorry, mattyp. :( So very sorry you lost him. Please don't give up on fish. If you want to get another betta, everyone here is more than happy to help you get it all set up.
From the sounds of it, Marty may have had some ammonia/chemical poisoning and possibly a bacterial infection. There may not have been anything you could have done but he passed away knowing someone loved him very much and I know he's grateful to you.
10g tank = 25-35% a week, gravel siphoning. 50% if it isn't cycled yet.