Updated variables' names and functions' names

Overall indent is fixed