further development and bug fixes on command patterns.