misc changes
* changed file encoding
* renamed functions
* and more