Added support for args and kwargs when constructing resources