Cleaned up some stuff

organized the code, made it more structured, and changed the header name slightly
Merge pull request #3 from RavetcoFX/patch-3

Cleaned up some stuff