updated/unified the documentation and style plus some general cleanup