Cleaned up function parameters to be consistent *** MAY BREAK OLD CODE