Changed this to an class. Added BSD license.