Added documentation and bugfixes
Added more pedantic warning levels and fixed warnings