Fixed demos and phpdocs

The demos were broken and the IDE completion wasn't working well, so I fixed it.