This question looks like it might be a pretty good fit for
Code Review.SE, provided that (a) you want a
full review, (b) your code is
already working, and (c) you're asking for a review of
concrete, real code, not abstract design (whether or not it's expressed as code). If you agree with all of those, please read about
what's on topic, and, if your question fits that, delete it here and repost it on CR. —
Phrancis 25 secs ago