Updated documentation (content and style), removed unused functions, reformated parts of code. No functional changes.