Removed singleton & code cleanup. (bob2 & nedbat).