Initial commit
Basic outline, still buggy.
Changed serializing to json and fixed bugs.