Fixed some warnings, improved vision cone code.