Added createObject and createArray methods.