initial support for detecting image load and other improvements