major overhaul of debug, now centralized flags. Also implemented object linking.