moved errors and component definitions into single files