Fullscreen API integration

Rewrote input handling and integrated Fullscreen API.