Extract commands code