First version - valgrind says it has leaks
Fixed wrong realloc usage - valgrind says "0 errors"
Merge branch 'v0.0.1'