Added functionality for creating contracts