Added basic internal procedure generation