renamed some methods
Restructured api to expose single function
changed to apache license