Testing and additional comments
fixed up toolbox

and tested with AM database