Added the thread creation , right now it just joins straight away.
Ignore profiling files.
Added profiling targets.
Whitespace.
Handle malloc failures.
Initialize variables who's default values are used in further calculations.