Improve robotbuilder

do some clean up and add input validations