MODERNIZE. Almost all deprecated features fixed.