Implemented viewport
Allow papyrus to set viewport through cast
Added a few null checks