Add some documentation and export foreach