Finished first draft of viewport_create
Fixed bugs related with last commit