Issue #12: adds basic resource management