revised piccololib to be integrated with controllo