OO version
Minor refactorings
More enhancements
Adding index
Finally, a reasonable working OO version