added library documentation and renamed some stuff