modify cap arch

move tasks to independent files
add testing stage