added file documentation and fixed warnings