Made things Object-Oriented in the plugin JS and PHP code
Added test harness (no tests yet)