Formatting, documentation, bugfixes