Renaming functions, adding logging skeleton