Fixed bug where if statement always was truthy. Removed debug message and fixed style.