Fixed memleaks #25. Fixed video loops #26.