Huge changes

Changed architecture to be more extensible, added MySQL support and
support for custom serializers.