Added Command Pattern and extended Factory a little