-Quick pass on names with typos

-quick refactoring on very obvious duplicated code
-add some tabs and spaces for the code to be even more easy to read.