Made some changes to be able to parse user-defined commands.