Patched Project 2

All the new defined structures and functions.