Cleaned up, made less ambiguous variable names