Tyler changes

Included main () function and debugged undefined errors.