Added structure and some implementations