Fix memory leak
Relative path support
Fix minor issues