Fixing vs warnings and deleting unused define