Inline documentation and coding standarts

- Added inline documentation
- renamed functions according to coding standart