Added material system, numerous improvements.