extract output codes to libbuilder for other projects
add CodeDialog