Removed debug printing, error check, and unnecessary stack pushes