Changed some declaration to const and changed their variable names for consistency