More descriptive specs, fixed some inconsistencies in function declarations.