fixed gui showing after view edges issue.
Cleaned up some unnecessary code.