First Commit, functions prtotyped, subject to change