Fixing typos on functions and variables definitions