Overlay and binary handling functions.