Added classes for resource management.
Added a .gitignore.