Added .gitignore to ignore temporary files. Simplified the activate_library_function.