Added test arg
Simple tests and bugfixes.
Compiles but I'm afraid to run it
No segfault now. Just error handling.
KEEP ON TRUCKIN'
Off by 1 error