Refactored to make install a standalone resource