Updated functions, removed main