Added comments and specs to exported functions.