enabled compiler optimizations

Turned option strict on with necessary code change.