Moved shadow mapping to its own class.