Optimized code

Allow control of default arguments
Tidy up fgets/streams, set fgets to default method as lower cpu usage
Better sequence handling, throws exception if out of sequence