Hotfix: nightly warnings

Adding back a flag when building demos, fixing other warnings with commenting out and casts.

Duplicate of #45, includes the patches that master is ahead of develop.