Model-View design pattern applied.