Added types and functions declarations.