Pull request

I am submitting this request to make everything more efficient (written in php for low level language) and changed most public methods to private to avoid them showing up on a webpage via XHTML or Python/C#