Added Tools library

Other small fixes