Complete rewrite

Rewriting in hopes to make it easier to add new features and options