renaming, moving and deleting unused functions, fixing indentation etc.