Trying out some design patterns