Add v4. Total rewrite to try and achieve some semblance of sensible OOP code.