Added warnings and updated comments