Removed logging statements and fixed firefox support