Methods now applied to res, instead of fs [stoopid]