Restructure everything/Clean up code
Got data reading/writing to work
Also fixed some syntax/runtime errors and tarted testing commands.
Added build flag
Plus some tweeks including dynamic flag permissions (Everything still needs a good testing.
P.S. forgot to add new flag to register list, nbd.
More fixes + testing
Merge pull request #1 from Tschrock/rewrite

Merge rewrite into master