Cleaned up video code