Cleanup, added comments and comparing results with Matlab testing. Added graph and export methods.