cleaned up video and gui code