Added dialog system
Tidyed rendering functions