Added license
Fixed function names