Removed debug messages, changed var to this