Added license headers, improved documentation