Merged and squashed prototype code