Implement getOrCreate

Closes #1.